﻿

using IotContract.Enums;
using ProtoBuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IotContract.Models.Clients;
/// <summary>
/// 客户端状态命令
/// </summary>
[ProtoContract]
public class ClientStatusCommand:IClientCommand
{
    /// <summary>
    /// 程序状态;0 离线状态 1 待机状态 -1 异常状态  2 运行状态
    /// </summary>
    [ProtoMember(1)]
    public ProgramStatusType Status { get; set; }

    /// <summary>
    /// 状态描述;描述异常情况
    /// </summary>
    [ProtoMember(2)]
    public string StatusDes { get; set; }
    /// <summary>
    /// 程序名称
    /// </summary>
    [ProtoMember(3)]
    public string Name { get; set; }

    /// <summary>
    /// 内存占用;内存占用大小MB
    /// </summary>
    [ProtoMember(4)]
    public int Ram { get; set; }


    /// <summary>
    /// cpu占用;cpu占用大小
    /// </summary>
    [ProtoMember(5)]
    public int Cpu { get; set; }
    /// <summary>
    /// 程序Id
    /// </summary>
    [ProtoMember(6)]
    public long ProgramId { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    [ProtoMember(7)]
    public string Remark { get; set; }

    [ProtoMember(8)]
    public string Id { get; set; } = Guid.NewGuid().ToString();
}

[ProtoContract]
public class ClientStatusReturn
{
    /// <summary>
    /// 程序名称
    /// </summary>
    [ProtoMember(1)]
    public string Name { get; set; }
    /// <summary>
    /// 是否启用
    /// </summary>
    [ProtoMember(2)]
    public int IsEnable { get; set; }
    /// <summary>
    /// 程序id
    /// </summary>
    [ProtoMember(3)]
    public long ProgramId { get; set; }
}

